<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title></title>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/css/common.css">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Uploadify/uploadify.css">
	<script type="text/javascript" src='__PUBLIC__/Admin/js/jquery-1.7.2.min.js'></script>
	<script type="text/javascript" src='__PUBLIC__/Uploadify/jquery.uploadify.min.js'></script>
	<script type="text/javascript" src='__PUBLIC__/Admin/js/goods.js'></script>
	<script type="text/javascript">window.UEDITOR_HOME_URL = '__PUBLIC__/ueditor/';</script>
	<script type="text/javascript" src='__PUBLIC__/ueditor/editor_config.js'></script>
	<script type="text/javascript" src='__PUBLIC__/ueditor/editor_all_min.js'></script>
	<script type="text/javascript">
		var getAttr="{:U('getAttr')}";
		var uploadList="{:U('Common/uploadList')}";
		var PUBLIC="__PUBLIC__";
		var sessionId = "<?php echo session_id();?>";
		var ROOT = "__ROOT__";
		var uploadPic="{:U('Common/uploadPic')}";
	</script>
</head>
<body>
	<div class='status'><span>添加商品</span></div>
	<div>
		<form method='post' action="{:U('runAddGoods')}">
			<table class='table'>
				<tr>
					<td class='td_right'>所属分类：</td>
					<td class='td_left'><select class='select' name='cid' style='text-align:left;'>
						<option>请选择</option>
						<foreach name='cate' item='v'><!--pid这是分类的父类iD-->
							<option value='{$v.id}' tid='{$v.tid}' pid='{$v.pid}'>{$v.html}{$v.name}</option>
						</foreach>
					</select></td>
				</tr>
				<tr>
					<td class='td_right'>商品名称：</td>
					<td class='td_left'><input type='text' class='text' name='name'/></td>
				</tr>
				<tr>
					<td class='td_right'>市场价：</td>
					<td class='td_left'><input type='text' class='text' name='mprice'/></td>
				</tr>
				<tr>
					<td class='td_right'>商城价：</td>
					<td class='td_left'><input type='text' class='text' name='sprice'/></td>
				</tr>
				<tr>
					<td class='td_right'>单位：</td>
					<td class='td_left'><input type='text' class='text' name='unit'/></td>
				</tr>
				<tr>
					<td class='td_right'>商品总库存：</td>
					<td class='td_left'><input type='text' class='text' name='inventory'/></td>
				</tr>
				<tr>
					<td class='td_right'>点击率：</td>
					<td class='td_left'><input type='text' class='text' name='click'/></td>
				</tr>
				<tr>
					<td class='td_right'>商品货号：</td>
					<td class='td_left'><input type='text' class='text' name='number'/></td>
				</tr>
				<tr>
					<td class='td_right'>商品品牌：</td>
					<td class='td_left'><select name='bid' class='select'>
						<option>请选择</option>
						<foreach name='brand' item='v'>
							<option value="{$v.id}">{$v.name}</option>
						</foreach>
					</select></td>
				</tr>
			</table>
			<!--属性-->
			<table class="table" id='attr' style='display:none;'>
				<thead>
				<tr><th colspan='2'>属性</th></tr>
				</thead>
				<tbody>
				
				</tbody>
			</table>
			<!--规格-->
			<table class="table" id='spec' style='display:none;'>
				<thead>
				<tr><th colspan='4'>规格</th></tr>
				</thead>
				<tbody>
				
				</tbody>
			</table>
			<!--列表图-->
			<table class='table'> 
				<tr><th colspan='2'>列表图</th></tr>
				<tr>
					<td>上传图片：</td><td style='text-align:left;'>
					<div id='showList'></div>
					<input type='file' id='list'/>
					<input type='hidden' name='listpic' value=''/></td>
				</tr>
			</table>
			<!--商品图册-->
			<table class='table'> 
				<tr><th colspan='2'>商品图册</th></tr>
				<tr><td>上传图片：</td><td style='text-align:left;'>
					<div id='showPic'></div>
					<div id='picpath'></div>
					<input type='file' id='pic'/></td>
				</tr>
			</table>
			<!--商品详细-->
			<table class='table'>
				<tr><th>商品详细</th></tr>
				<tr>
					<td>
						<textarea name='intro' id='intro'></textarea>
						<script type="text/javascript">
						window.UEDITOR_CONFIG.initialFrameWidth = '100%';
						window.UEDITOR_CONFIG.initialFrameHeight = 200;
						window.UEDITOR_CONFIG.imageUrl = "{:U('Common/intro')}";
						window.UEDITOR_CONFIG.imagePath = "__ROOT__/Uploads/intro/";
						UE.getEditor('intro');
						</script>
					</td>
				</tr>
			</table>
			<!--售后服务-->
		<table class="table">
			<tr>
				<th>售后服务</th>
			</tr>
			<tr>
				<td colspan='2'>
					<textarea name="service" id="service"></textarea>
					<script type="text/javascript">
						window.UEDITOR_CONFIG.imageUrl = "{:U('Common/service')}";
						window.UEDITOR_CONFIG.imagePath = "__ROOT__/Uploads/service/";
						UE.getEditor('service');
					</script>
				</td>
			</tr>
		</table>
			<p style='text-align:center;margin-top:10px;'>
				<input type="hidden" name='tid' value=''/>
				<input type='submit' value='保存添加' class='add_btn'/></p>
		</form>
	</div>
</body>
</html>